## API Report File for "@backstage/plugin-kubernetes-react"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { ApiRef } from '@backstage/core-plugin-api';
import { AsyncState } from 'react-use/lib/useAsyncFn';
import { ClientContainerStatus } from '@backstage/plugin-kubernetes-common';
import { ClientPodStatus } from '@backstage/plugin-kubernetes-common';
import { ClusterAttributes } from '@backstage/plugin-kubernetes-common';
import { ClusterObjects } from '@backstage/plugin-kubernetes-common';
import { CustomObjectsByEntityRequest } from '@backstage/plugin-kubernetes-common';
import { CustomResourceMatcher } from '@backstage/plugin-kubernetes-common';
import { DetectedError } from '@backstage/plugin-kubernetes-common';
import { DetectedErrorsByCluster } from '@backstage/plugin-kubernetes-common';
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { Entity } from '@backstage/catalog-model';
import { Event as Event_2 } from 'kubernetes-models/v1';
import { GroupedResponses } from '@backstage/plugin-kubernetes-common';
import { IContainer } from 'kubernetes-models/v1';
import { IContainerStatus } from 'kubernetes-models/v1';
import { IdentityApi } from '@backstage/core-plugin-api';
import { IIoK8sApimachineryPkgApisMetaV1ObjectMeta } from '@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta';
import { IObjectMeta } from '@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta';
import { JsonObject } from '@backstage/types';
import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-common';
import { OAuthApi } from '@backstage/core-plugin-api';
import { ObjectsByEntityResponse } from '@backstage/plugin-kubernetes-common';
import { OpenIdConnectApi } from '@backstage/core-plugin-api';
import { Pod } from 'kubernetes-models/v1';
import { Pod as Pod_2 } from 'kubernetes-models/v1/Pod';
import { ProfileInfoApi } from '@backstage/core-plugin-api';
import { default as React_2 } from 'react';
import * as React_3 from 'react';
import { TypeMeta } from '@kubernetes-models/base';
import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node';
import { V1Job } from '@kubernetes/client-node';
import { V1ObjectMeta } from '@kubernetes/client-node';
import { V1Pod } from '@kubernetes/client-node';
import { WorkloadsByEntityRequest } from '@backstage/plugin-kubernetes-common';

// @public (undocumented)
export class AksClusterLinksFormatter implements ClusterLinksFormatter {
  // (undocumented)
  formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
}

// @public (undocumented)
export class AksKubernetesAuthProvider implements KubernetesAuthProvider {
  constructor(microsoftAuthApi: OAuthApi);
  // (undocumented)
  decorateRequestBodyForAuth(
    requestBody: KubernetesRequestBody,
  ): Promise<KubernetesRequestBody>;
  // (undocumented)
  getCredentials(): Promise<{
    token?: string;
  }>;
}

// @public
export const Cluster: ({
  clusterObjects,
  podsWithErrors,
}: ClusterProps) => React_2.JSX.Element;

// @public (undocumented)
export const ClusterContext: React_2.Context<ClusterAttributes>;

// @public (undocumented)
export interface ClusterLinksFormatter {
  // (undocumented)
  formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
}

// @public (undocumented)
export interface ClusterLinksFormatterOptions {
  // (undocumented)
  dashboardParameters?: JsonObject;
  // (undocumented)
  dashboardUrl?: URL;
  // (undocumented)
  kind: string;
  // (undocumented)
  object: any;
}

// @public
export type ClusterProps = {
  clusterObjects: ClusterObjects;
  podsWithErrors: Set<string>;
  children?: React_2.ReactNode;
};

// @public
export const ContainerCard: React_2.FC<ContainerCardProps>;

// @public
export interface ContainerCardProps {
  // (undocumented)
  containerMetrics?: ClientContainerStatus;
  // (undocumented)
  containerSpec?: IContainer;
  // (undocumented)
  containerStatus: IContainerStatus;
  // (undocumented)
  podScope: PodScope;
}

// @public
export interface ContainerScope extends PodScope {
  // (undocumented)
  containerName: string;
}

// @public (undocumented)
export const CronJobsAccordions: ({}: CronJobsAccordionsProps) => React_2.JSX.Element;

// @public (undocumented)
export type CronJobsAccordionsProps = {
  children?: React_2.ReactNode;
};

// @public (undocumented)
export const CustomResources: ({}: CustomResourcesProps) => React_2.JSX.Element;

// @public (undocumented)
export interface CustomResourcesProps {
  // (undocumented)
  children?: React_2.ReactNode;
}

// @public (undocumented)
export const DEFAULT_FORMATTER_NAME = 'standard';

// @public
export const DetectedErrorsContext: React_2.Context<DetectedError[]>;

// @public (undocumented)
export class EksClusterLinksFormatter implements ClusterLinksFormatter {
  // (undocumented)
  formatClusterLink(_options: ClusterLinksFormatterOptions): Promise<URL>;
}

// @public
export const ErrorList: ({
  podAndErrors,
}: ErrorListProps) => React_2.JSX.Element;

// @public
export interface ErrorListProps {
  // (undocumented)
  podAndErrors: PodAndErrors[];
}

// @public (undocumented)
export type ErrorMatcher = {
  metadata?: IIoK8sApimachineryPkgApisMetaV1ObjectMeta;
} & TypeMeta;

// @public (undocumented)
export const ErrorPanel: ({
  entityName,
  errorMessage,
  clustersWithErrors,
}: ErrorPanelProps) => React_2.JSX.Element;

// @public (undocumented)
export type ErrorPanelProps = {
  entityName: string;
  errorMessage?: string;
  clustersWithErrors?: ClusterObjects[];
  children?: React_2.ReactNode;
};

// @public (undocumented)
export const ErrorReporting: ({
  detectedErrors,
  clusters,
}: ErrorReportingProps) => React_3.JSX.Element;

// @public (undocumented)
export type ErrorReportingProps = {
  detectedErrors: DetectedErrorsByCluster;
  clusters: ClusterAttributes[];
};

// @public
export const Events: ({
  involvedObjectName,
  namespace,
  clusterName,
  warningEventsOnly,
}: EventsProps) => React_2.JSX.Element;

// @public
export const EventsContent: ({
  events,
  warningEventsOnly,
}: EventsContentProps) => React_2.JSX.Element;

// @public
export interface EventsContentProps {
  // (undocumented)
  events: Event_2[];
  // (undocumented)
  warningEventsOnly?: boolean;
}

// @public
export interface EventsOptions {
  // (undocumented)
  clusterName: string;
  // (undocumented)
  involvedObjectName: string;
  // (undocumented)
  namespace: string;
}

// @public
export interface EventsProps {
  // (undocumented)
  clusterName: string;
  // (undocumented)
  involvedObjectName: string;
  // (undocumented)
  namespace: string;
  // (undocumented)
  warningEventsOnly?: boolean;
}

// @public
export const FixDialog: React_2.FC<FixDialogProps>;

// @public
export interface FixDialogProps {
  // (undocumented)
  clusterName: string;
  // (undocumented)
  error: DetectedError;
  // (undocumented)
  open?: boolean;
  // (undocumented)
  pod: Pod_2;
}

// @public (undocumented)
export type FormatClusterLinkOptions = {
  dashboardUrl?: string;
  dashboardApp?: string;
  dashboardParameters?: JsonObject;
  object: any;
  kind: string;
};

// @public (undocumented)
export function getDefaultFormatters(deps: {
  googleAuthApi: ProfileInfoApi;
}): Record<string, ClusterLinksFormatter>;

// @public (undocumented)
export class GkeClusterLinksFormatter implements ClusterLinksFormatter {
  constructor(googleAuthApi: ProfileInfoApi | undefined);
  // (undocumented)
  formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
}

// @public (undocumented)
export class GoogleKubernetesAuthProvider implements KubernetesAuthProvider {
  constructor(authProvider: OAuthApi);
  // (undocumented)
  authProvider: OAuthApi;
  // (undocumented)
  decorateRequestBodyForAuth(
    requestBody: KubernetesRequestBody,
  ): Promise<KubernetesRequestBody>;
  // (undocumented)
  getCredentials(): Promise<{
    token: string;
  }>;
}

// @public (undocumented)
export const GroupedResponsesContext: React_2.Context<GroupedResponses>;

// @public (undocumented)
export const HorizontalPodAutoscalerDrawer: (props: {
  hpa: V1HorizontalPodAutoscaler;
  expanded?: boolean;
  children?: React_2.ReactNode;
}) => React_2.JSX.Element;

// @public (undocumented)
export const IngressesAccordions: ({}: IngressesAccordionsProps) => React_2.JSX.Element;

// @public (undocumented)
export type IngressesAccordionsProps = {};

// @public (undocumented)
export const JobsAccordions: ({
  jobs,
}: JobsAccordionsProps) => React_2.JSX.Element;

// @public (undocumented)
export type JobsAccordionsProps = {
  jobs: V1Job[];
  children?: React_2.ReactNode;
};

// @public (undocumented)
export interface KubernetesApi {
  // (undocumented)
  getCluster(clusterName: string): Promise<
    | {
        name: string;
        authProvider: string;
        oidcTokenProvider?: string;
        dashboardUrl?: string;
      }
    | undefined
  >;
  // (undocumented)
  getClusters(): Promise<
    {
      name: string;
      authProvider: string;
      oidcTokenProvider?: string;
    }[]
  >;
  // (undocumented)
  getCustomObjectsByEntity(
    request: CustomObjectsByEntityRequest,
  ): Promise<ObjectsByEntityResponse>;
  // (undocumented)
  getObjectsByEntity(
    requestBody: KubernetesRequestBody,
  ): Promise<ObjectsByEntityResponse>;
  // (undocumented)
  getWorkloadsByEntity(
    request: WorkloadsByEntityRequest,
  ): Promise<ObjectsByEntityResponse>;
  // (undocumented)
  proxy(options: {
    clusterName: string;
    path: string;
    init?: RequestInit;
  }): Promise<Response>;
}

// @public (undocumented)
export const kubernetesApiRef: ApiRef<KubernetesApi>;

// @public (undocumented)
export interface KubernetesAuthProvider {
  // (undocumented)
  decorateRequestBodyForAuth(
    requestBody: KubernetesRequestBody,
  ): Promise<KubernetesRequestBody>;
  // (undocumented)
  getCredentials(): Promise<{
    token?: string;
  }>;
}

// @public (undocumented)
export class KubernetesAuthProviders implements KubernetesAuthProvidersApi {
  constructor(options: {
    microsoftAuthApi: OAuthApi;
    googleAuthApi: OAuthApi;
    oidcProviders?: {
      [key: string]: OpenIdConnectApi;
    };
  });
  // (undocumented)
  decorateRequestBodyForAuth(
    authProvider: string,
    requestBody: KubernetesRequestBody,
  ): Promise<KubernetesRequestBody>;
  // (undocumented)
  getCredentials(authProvider: string): Promise<{
    token?: string;
  }>;
}

// @public (undocumented)
export interface KubernetesAuthProvidersApi {
  // (undocumented)
  decorateRequestBodyForAuth(
    authProvider: string,
    requestBody: KubernetesRequestBody,
  ): Promise<KubernetesRequestBody>;
  // (undocumented)
  getCredentials(authProvider: string): Promise<{
    token?: string;
  }>;
}

// @public (undocumented)
export const kubernetesAuthProvidersApiRef: ApiRef<KubernetesAuthProvidersApi>;

// @public (undocumented)
export class KubernetesBackendClient implements KubernetesApi {
  constructor(options: {
    discoveryApi: DiscoveryApi;
    identityApi: IdentityApi;
    kubernetesAuthProvidersApi: KubernetesAuthProvidersApi;
  });
  // (undocumented)
  getCluster(clusterName: string): Promise<{
    name: string;
    authProvider: string;
    oidcTokenProvider?: string;
  }>;
  // (undocumented)
  getClusters(): Promise<
    {
      name: string;
      authProvider: string;
    }[]
  >;
  // (undocumented)
  getCustomObjectsByEntity(
    request: CustomObjectsByEntityRequest,
  ): Promise<ObjectsByEntityResponse>;
  // (undocumented)
  getObjectsByEntity(
    requestBody: KubernetesRequestBody,
  ): Promise<ObjectsByEntityResponse>;
  // (undocumented)
  getWorkloadsByEntity(
    request: WorkloadsByEntityRequest,
  ): Promise<ObjectsByEntityResponse>;
  // (undocumented)
  proxy(options: {
    clusterName: string;
    path: string;
    init?: RequestInit;
  }): Promise<Response>;
}

// @public (undocumented)
export class KubernetesClusterLinkFormatter
  implements KubernetesClusterLinkFormatterApi
{
  constructor(options: {
    formatters: Record<string, ClusterLinksFormatter>;
    defaultFormatterName: string;
  });
  // (undocumented)
  formatClusterLink(
    options: FormatClusterLinkOptions,
  ): Promise<string | undefined>;
}

// @public (undocumented)
export interface KubernetesClusterLinkFormatterApi {
  // (undocumented)
  formatClusterLink(
    options: FormatClusterLinkOptions,
  ): Promise<string | undefined>;
}

// @public (undocumented)
export const kubernetesClusterLinkFormatterApiRef: ApiRef<KubernetesClusterLinkFormatterApi>;

// @public
export const KubernetesDrawer: ({
  open,
  label,
  drawerContentsHeader,
  kubernetesObject,
  children,
}: KubernetesDrawerProps) => React_2.JSX.Element;

// @public (undocumented)
export interface KubernetesDrawerable {
  // (undocumented)
  metadata?: V1ObjectMeta;
}

// @public
export interface KubernetesDrawerProps {
  // (undocumented)
  children?: React_2.ReactNode;
  // (undocumented)
  drawerContentsHeader?: React_2.ReactNode;
  // (undocumented)
  kubernetesObject: KubernetesObject;
  // (undocumented)
  label: React_2.ReactNode;
  // (undocumented)
  open?: boolean;
}

// @public
export interface KubernetesObject {
  // (undocumented)
  kind: string;
  // (undocumented)
  metadata?: IObjectMeta;
}

// @public (undocumented)
export interface KubernetesObjects {
  // (undocumented)
  error?: string;
  // (undocumented)
  kubernetesObjects?: ObjectsByEntityResponse;
  // (undocumented)
  loading: boolean;
}

// @public (undocumented)
export interface KubernetesProxyApi {
  // (undocumented)
  getEventsByInvolvedObjectName(request: {
    clusterName: string;
    involvedObjectName: string;
    namespace: string;
  }): Promise<Event_2[]>;
  // (undocumented)
  getPodLogs(request: {
    podName: string;
    namespace: string;
    clusterName: string;
    containerName: string;
    previous?: boolean;
  }): Promise<{
    text: string;
  }>;
}

// @public (undocumented)
export const kubernetesProxyApiRef: ApiRef<KubernetesProxyApi>;

// @public
export class KubernetesProxyClient {
  constructor(options: { kubernetesApi: KubernetesApi });
  // (undocumented)
  getEventsByInvolvedObjectName({
    clusterName,
    involvedObjectName,
    namespace,
  }: {
    clusterName: string;
    involvedObjectName: string;
    namespace: string;
  }): Promise<Event_2[]>;
  // (undocumented)
  getPodLogs({
    podName,
    namespace,
    clusterName,
    containerName,
    previous,
  }: {
    podName: string;
    namespace: string;
    clusterName: string;
    containerName: string;
    previous?: boolean;
  }): Promise<{
    text: string;
  }>;
}

// @public (undocumented)
export const KubernetesStructuredMetadataTableDrawer: <
  T extends KubernetesDrawerable,
>({
  object,
  renderObject,
  kind,
  buttonVariant,
  expanded,
  children,
}: KubernetesStructuredMetadataTableDrawerProps<T>) => React_2.JSX.Element;

// @public (undocumented)
export interface KubernetesStructuredMetadataTableDrawerProps<
  T extends KubernetesDrawerable,
> {
  // (undocumented)
  buttonVariant?: 'h5' | 'subtitle2';
  // (undocumented)
  children?: React_2.ReactNode;
  // (undocumented)
  expanded?: boolean;
  // (undocumented)
  kind: string;
  // (undocumented)
  object: T;
  // (undocumented)
  renderObject: (obj: T) => object;
}

// @public (undocumented)
export const LinkErrorPanel: ({
  cluster,
  errorMessage,
}: LinkErrorPanelProps) => React_2.JSX.Element;

// @public (undocumented)
export type LinkErrorPanelProps = {
  cluster: ClusterAttributes;
  errorMessage?: string;
  children?: React_2.ReactNode;
};

// @public
export const ManifestYaml: ({
  object,
}: ManifestYamlProps) => React_2.JSX.Element;

// @public
export interface ManifestYamlProps {
  // (undocumented)
  object: object;
}

// @public (undocumented)
export class OidcKubernetesAuthProvider implements KubernetesAuthProvider {
  constructor(providerName: string, authProvider: OpenIdConnectApi);
  // (undocumented)
  authProvider: OpenIdConnectApi;
  // (undocumented)
  decorateRequestBodyForAuth(
    requestBody: KubernetesRequestBody,
  ): Promise<KubernetesRequestBody>;
  // (undocumented)
  getCredentials(): Promise<{
    token: string;
  }>;
  // (undocumented)
  providerName: string;
}

// @public (undocumented)
export class OpenshiftClusterLinksFormatter {
  // (undocumented)
  formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
}

// @public
export const PendingPodContent: ({
  pod,
}: PendingPodContentProps) => React_2.JSX.Element;

// @public
export interface PendingPodContentProps {
  // (undocumented)
  pod: Pod;
}

// @public
export interface PodAndErrors {
  // (undocumented)
  cluster: ClusterAttributes;
  // (undocumented)
  errors: DetectedError[];
  // (undocumented)
  pod: Pod;
}

// @public (undocumented)
export type PodColumns = 'READY' | 'RESOURCE';

// @public
export const PodDrawer: ({
  podAndErrors,
  open,
}: PodDrawerProps) => React_2.JSX.Element;

// @public
export interface PodDrawerProps {
  // (undocumented)
  open?: boolean;
  // (undocumented)
  podAndErrors: PodAndErrors;
}

// @public
export const PodExecTerminal: (
  props: PodExecTerminalProps,
) => React_2.JSX.Element;

// @public
export const PodExecTerminalDialog: (
  props: PodExecTerminalProps,
) => false | React_2.JSX.Element | undefined;

// @public
export interface PodExecTerminalProps {
  // (undocumented)
  cluster: ClusterAttributes;
  // (undocumented)
  containerName: string;
  // (undocumented)
  podName: string;
  // (undocumented)
  podNamespace: string;
}

// @public
export const PodLogs: React_2.FC<PodLogsProps>;

// @public
export const PodLogsDialog: ({
  containerScope,
}: PodLogsDialogProps) => React_2.JSX.Element;

// @public
export interface PodLogsDialogProps {
  // (undocumented)
  containerScope: ContainerScope;
}

// @public
export interface PodLogsOptions {
  // (undocumented)
  containerScope: ContainerScope;
  // (undocumented)
  previous?: boolean;
}

// @public
export interface PodLogsProps {
  // (undocumented)
  containerScope: ContainerScope;
  // (undocumented)
  previous?: boolean;
}

// @public
export const PodMetricsContext: React_2.Context<Map<string, ClientPodStatus[]>>;

// @public (undocumented)
export type PodMetricsMatcher = {
  metadata?: IObjectMeta;
};

// @public (undocumented)
export const PodNamesWithErrorsContext: React_2.Context<Set<string>>;

// @public (undocumented)
export const PodNamesWithMetricsContext: React_2.Context<
  Map<string, ClientPodStatus>
>;

// @public
export interface PodScope {
  // (undocumented)
  cluster: ClusterAttributes;
  // (undocumented)
  podName: string;
  // (undocumented)
  podNamespace: string;
}

// @public (undocumented)
export const PodsTable: ({
  pods,
  extraColumns,
}: PodsTablesProps) => React_2.JSX.Element;

// @public (undocumented)
export type PodsTablesProps = {
  pods: Pod_2 | V1Pod[];
  extraColumns?: PodColumns[];
  children?: React_2.ReactNode;
};

// @public (undocumented)
export class RancherClusterLinksFormatter implements ClusterLinksFormatter {
  // (undocumented)
  formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
}

// @public (undocumented)
export const READY_COLUMNS: PodColumns;

// @public (undocumented)
export const RESOURCE_COLUMNS: PodColumns;

// @public
export const ResourceUtilization: ({
  compressed,
  title,
  usage,
  total,
  totalFormatted,
}: ResourceUtilizationProps) => React_2.JSX.Element;

// @public
export interface ResourceUtilizationProps {
  // (undocumented)
  compressed?: boolean;
  // (undocumented)
  title: string;
  // (undocumented)
  total: number | string;
  // (undocumented)
  totalFormatted: string;
  // (undocumented)
  usage: number | string;
}

// @public
export class ServerSideKubernetesAuthProvider
  implements KubernetesAuthProvider
{
  // (undocumented)
  decorateRequestBodyForAuth(
    requestBody: KubernetesRequestBody,
  ): Promise<KubernetesRequestBody>;
  // (undocumented)
  getCredentials(): Promise<{}>;
}

// @public (undocumented)
export const ServicesAccordions: ({}: ServicesAccordionsProps) => React_2.JSX.Element;

// @public (undocumented)
export type ServicesAccordionsProps = {};

// @public (undocumented)
export class StandardClusterLinksFormatter implements ClusterLinksFormatter {
  // (undocumented)
  formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL>;
}

// @public
export const useCustomResources: (
  entity: Entity,
  customResourceMatchers: CustomResourceMatcher[],
  intervalMs?: number,
) => KubernetesObjects;

// @public
export const useEvents: ({
  involvedObjectName,
  namespace,
  clusterName,
}: EventsOptions) => AsyncState<Event_2[]>;

// @public (undocumented)
export const useKubernetesObjects: (
  entity: Entity,
  intervalMs?: number,
) => KubernetesObjects;

// @public
export const useMatchingErrors: (matcher: ErrorMatcher) => DetectedError[];

// @public
export const usePodLogs: ({
  containerScope,
  previous,
}: PodLogsOptions) => AsyncState<{
  text: string;
}>;

// @public
export const usePodMetrics: (
  clusterName: string,
  matcher: PodMetricsMatcher,
) => ClientPodStatus | undefined;
```
